package com.andreams.restaurant.webservice;

import javax.ws.rs.GET;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Request;
import javax.ws.rs.core.UriInfo;

import com.andreams.restaurant.domain.Restaurant;
import com.andreams.restaurant.persistence.RestaurantDao;

public class RestaurantResource {

	@Context
	UriInfo uriInfo;
	@Context
	Request request;
	long id;
	
	public RestaurantResource(UriInfo uriInfo, Request request, long id) {
		super();
		this.uriInfo = uriInfo;
		this.request = request;
		this.id = id;
	}
	
	@GET
	@Produces(MediaType.APPLICATION_JSON)
	public Restaurant getRestaurant() {
		return new RestaurantDao().getRestaurant(id);
	}
	
}
